import { BasicColumn, FormSchema } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '字段名称',
    dataIndex: 'fieldName',
    width: 200,
  },
  {
    title: '字段编码',
    dataIndex: 'fieldCode',
    width: 200,
  },
  {
    title: '字段类型',
    dataIndex: 'fieldType',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'fieldName',
    label: '字段名称',
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: 'fieldCode',
    label: '字段编码',
    component: 'Input',
    colProps: { span: 8 },
  },
  /*{
    field: 'fieldSourceId',
    label: 'ID',
    component: 'Input',
    ifShow: false,
  },*/
];

export const formSchema: FormSchema[] = [
  {
    field: 'fieldId',
    label: '字段ID',
    component: 'Input',
    ifShow: false,
  },
  {
    field: 'fieldSourceId',
    label: '字段来源ID',
    component: 'Input',
    ifShow: false,
  },
  {
    field: 'fieldName',
    label: '字段名',
    required: true,
    component: 'Input',
  },
  {
    field: 'fieldCode',
    label: '字段编码',
    required: true,
    component: 'Input',
  },
  {
    field: 'fieldType',
    label: '字段类型',
    required: true,
    component: 'Input',
  },
];
